learn how to create an api